package com.glamour.hlcity.module.dom.analysis.impl;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.openide.util.lookup.ServiceProvider;

import com.glamour.hlcity.common.data.model.ClassifiedKey;
import com.glamour.hlcity.common.data.model.ClueNode;
import com.glamour.hlcity.common.data.model.TagAttribute;
import com.glamour.hlcity.common.data.model.TagNode;
import com.glamour.hlcity.common.enums.ClassifiedEnum;
import com.glamour.hlcity.common.model.Node;
import com.glamour.hlcity.common.util.ListUtil;
import com.glamour.hlcity.module.dom.analysis.Classified;
import com.glamour.hlcity.module.dom.analysis.ClueClassified;
/**
 * 
 * 父亲节点名称相等
 * @author zhaoxing.liuzx
 *
 */
@ServiceProvider(service = Classified.class)
public class ParentClueClassified extends  GeneralClueClassified {

	private final static String TOP_TAG_NAME="hlcity_html_top_tag";
	@Override
	public ClassifiedEnum getClassifiedEnum() {
		// 仅父亲节点标签名称相同
		return ClassifiedEnum.ONLY_SAME_PARENT_TAG_NAME;
	}

	@Override
	public String classifiedKeyValue(Node node){
		
		Node parent=node.getParentNode();
		if(parent==null){
			return TOP_TAG_NAME;
		}
		return parent.getNodeName();
	}

}
